package GUI;

import java.awt.EventQueue;

import javax.swing.JFrame;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import javax.swing.JPanel;
import java.awt.Color;
import javax.swing.JLabel;

import java.awt.Graphics;
import java.awt.GridBagConstraints;
import java.awt.Image;
import java.awt.Insets;
import java.awt.FlowLayout;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Panel;
import javax.swing.JSpinner;
import java.awt.CardLayout;

import javax.swing.ButtonGroup;
import javax.swing.ImageIcon;
import javax.swing.JTextField;
import javax.swing.JRadioButton;
import javax.swing.JToggleButton;
import javax.swing.JLayeredPane;
import javax.swing.JComboBox;
import javax.swing.JTabbedPane;
import java.awt.event.MouseMotionAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JScrollPane;
import javax.swing.JTextPane;
import javax.swing.JScrollBar;
import javax.swing.SpinnerNumberModel;
import java.awt.event.MouseAdapter;
import java.awt.Canvas;

public class Main {

	private JFrame frame;
	private final JPanel Nombres = new JPanel();

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Main window = new Main();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public Main() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {

		frame = new JFrame();
		frame.setResizable(false);
		frame.setBounds(100, 100, 1154, 740);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		Nombres.setBounds(0, 0, 213, 43);
		Nombres.setBackground(Color.WHITE);
		frame.getContentPane().add(Nombres);
		Nombres.setLayout(null);
		
		JLabel Jug_n = new JLabel("Jugador");
		Jug_n.setBounds(10, 26, 86, 14);
		Nombres.add(Jug_n);
		
		JLabel Personaje_n = new JLabel("NOMBRE");
		Personaje_n.setBounds(10, 1, 89, 14);
		Nombres.add(Personaje_n);
		
		JLabel lblEnemigo = new JLabel("Enemigo");
		lblEnemigo.setBounds(118, 26, 95, 14);
		Nombres.add(lblEnemigo);
		
		JPanel Comands = new JPanel();
		Comands.setBounds(0, 246, 227, 140);
		frame.getContentPane().add(Comands);
		Comands.setLayout(null);
		
		JButton btnAtacar = new JButton("Atacar");
		btnAtacar.setBounds(0, 84, 84, 23);
		Comands.add(btnAtacar);
		
		JButton btnDefender = new JButton("Defender");
		btnDefender.setBounds(122, 84, 91, 23);
		Comands.add(btnDefender);
		
		JPanel Sacar = new JPanel();
		Sacar.setBackground(Color.GREEN);
		Sacar.setBounds(0, 0, 228, 71);
		Comands.add(Sacar);
		Sacar.setLayout(null);
		
		JSpinner LOW_q = new JSpinner();
		LOW_q.setBounds(65, 0, 29, 20);
		Sacar.add(LOW_q);
		LOW_q.setModel(new SpinnerNumberModel(0, 0, 5, 1));
		
		
		JLabel lblLow = new JLabel("Low");
		lblLow.setBounds(10, 2, 46, 14);
		Sacar.add(lblLow);
		
		JLabel lblMedium = new JLabel("Medium");
		lblMedium.setBounds(10, 27, 46, 14);
		Sacar.add(lblMedium);
		
		JSpinner MED_q = new JSpinner();
		MED_q.setModel(new SpinnerNumberModel(0, 0, 5, 1));
		MED_q.setBounds(65, 25, 29, 20);
		Sacar.add(MED_q);
		
		JSpinner HGH_q = new JSpinner();
		HGH_q.setModel(new SpinnerNumberModel(0, 0, 5, 1));
		HGH_q.setBounds(65, 50, 29, 20);
		Sacar.add(HGH_q);
		
		JLabel lblHigh = new JLabel("High");
		lblHigh.setBounds(10, 52, 46, 14);
		Sacar.add(lblHigh);
		
		JButton Sacar_A = new JButton("Sacar");
		Sacar_A.setBounds(122, 24, 89, 23);
		Sacar.add(Sacar_A);
		
		JButton btnTerminarTurno = new JButton("Terminar turno");
		btnTerminarTurno.setBounds(0, 117, 140, 23);
		Comands.add(btnTerminarTurno);
		
		JButton button_9 = new JButton("?");
		button_9.setBounds(169, 117, 44, 23);
		Comands.add(button_9);
		
		JPanel CartasAc = new JPanel();
		CartasAc.setBounds(10, 397, 201, 100);
		frame.getContentPane().add(CartasAc);
		CartasAc.setLayout(null);
		
		final JButton Colocar = new JButton("Colocar");
		Colocar.setBounds(2, 11, 87, 23);
		CartasAc.add(Colocar);
		
		
		
		final JButton Retirar = new JButton("Retirar");
		Retirar.setBounds(104, 11, 87, 23);
		CartasAc.add(Retirar);
		
		JComboBox comboBox = new JComboBox();
		comboBox.setBounds(10, 69, 179, 20);
		CartasAc.add(comboBox);
		
		JButton Destruir = new JButton("Destruir");
		Destruir.setBounds(0, 35, 89, 23);
		CartasAc.add(Destruir);
		
		
		
		JPanel Stats_P1 = new JPanel();
		Stats_P1.setBounds(10, 51, 94, 184);
		frame.getContentPane().add(Stats_P1);
		Stats_P1.setLayout(null);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBounds(0, 0, 46, 184);
		Stats_P1.add(panel_1);
		
		panel_1.setBackground(Color.YELLOW);
		panel_1.setLayout(null);
		
		JLabel lblAtk = new JLabel("Atk");
		lblAtk.setBounds(10, 36, 46, 14);
		panel_1.add(lblAtk);
		
		JLabel lblDef = new JLabel("Def");
		lblDef.setBounds(10, 61, 46, 14);
		panel_1.add(lblDef);
		
		JLabel lblVel = new JLabel("Vel");
		lblVel.setBounds(10, 86, 46, 14);
		panel_1.add(lblVel);
		
		JLabel lblMg = new JLabel("Mg");
		lblMg.setBounds(10, 106, 46, 23);
		panel_1.add(lblMg);
		
		JLabel lblArm = new JLabel("Arm");
		lblArm.setBounds(10, 136, 46, 14);
		panel_1.add(lblArm);
		
		JLabel lblHp = new JLabel("HP");
		lblHp.setBounds(10, 11, 46, 14);
		panel_1.add(lblHp);
		
		JLabel lblAlmas = new JLabel("Almas");
		lblAlmas.setBounds(10, 161, 46, 14);
		panel_1.add(lblAlmas);
		
		JPanel Vars1 = new JPanel();
		Vars1.setBounds(56, 0, 38, 184);
		Stats_P1.add(Vars1);
		Vars1.setBackground(Color.GREEN);
		Vars1.setLayout(null);
		
		JLabel ATK_a = new JLabel("1000");
		ATK_a.setBounds(0, 36, 28, 14);
		Vars1.add(ATK_a);
		
		JLabel DEF_a = new JLabel("1000");
		DEF_a.setBounds(0, 61, 28, 14);
		Vars1.add(DEF_a);
		
		JLabel VEL_a = new JLabel("1000");
		VEL_a.setBounds(0, 86, 28, 14);
		Vars1.add(VEL_a);
		
		JLabel MG_a = new JLabel("1000");
		MG_a.setBounds(0, 111, 28, 14);
		Vars1.add(MG_a);
		
		JLabel ARM_a = new JLabel("0");
		ARM_a.setBounds(0, 136, 28, 14);
		Vars1.add(ARM_a);
		
		JLabel ALMAS_a = new JLabel("10000");
		ALMAS_a.setBounds(0, 161, 38, 14);
		Vars1.add(ALMAS_a);
		
		JLabel HP_a = new JLabel("1000");
		HP_a.setBounds(0, 11, 28, 14);
		Vars1.add(HP_a);
		
		JPanel Stats_P2 = new JPanel();
		Stats_P2.setLayout(null);
		Stats_P2.setBounds(119, 49, 94, 184);
		frame.getContentPane().add(Stats_P2);
		
		JPanel panel_24 = new JPanel();
		panel_24.setLayout(null);
		panel_24.setBackground(Color.YELLOW);
		panel_24.setBounds(0, 0, 46, 184);
		Stats_P2.add(panel_24);
		
		JLabel label = new JLabel("Atk");
		label.setBounds(10, 36, 46, 14);
		panel_24.add(label);
		
		JLabel label_1 = new JLabel("Def");
		label_1.setBounds(10, 61, 46, 14);
		panel_24.add(label_1);
		
		JLabel label_2 = new JLabel("Vel");
		label_2.setBounds(10, 86, 46, 14);
		panel_24.add(label_2);
		
		JLabel label_3 = new JLabel("Mg");
		label_3.setBounds(10, 106, 46, 22);
		panel_24.add(label_3);
		
		JLabel label_4 = new JLabel("Arm");
		label_4.setBounds(10, 136, 46, 14);
		panel_24.add(label_4);
		
		JLabel label_5 = new JLabel("HP");
		label_5.setBounds(10, 11, 46, 14);
		panel_24.add(label_5);
		
		JLabel label_6 = new JLabel("Almas");
		label_6.setBounds(10, 161, 46, 14);
		panel_24.add(label_6);
		
		JPanel Vars2 = new JPanel();
		Vars2.setLayout(null);
		Vars2.setBackground(Color.GREEN);
		Vars2.setBounds(56, 0, 38, 184);
		Stats_P2.add(Vars2);
		
		JLabel ATK_b = new JLabel("1000");
		ATK_b.setBounds(0, 36, 28, 14);
		Vars2.add(ATK_b);
		
		JLabel DEF_b = new JLabel("1000");
		DEF_b.setBounds(0, 61, 28, 14);
		Vars2.add(DEF_b);
		
		JLabel VEL_b = new JLabel("1000");
		VEL_b.setBounds(0, 86, 28, 14);
		Vars2.add(VEL_b);
		
		JLabel MG_b = new JLabel("1000");
		
		MG_b.setBounds(0, 111, 28, 14);
		Vars2.add(MG_b);
		
		JLabel ARM_b = new JLabel("0");
		ARM_b.setBounds(0, 136, 28, 14);
		Vars2.add(ARM_b);
		
		JLabel ALMAS_b = new JLabel("10000");
		ALMAS_b.setBounds(0, 161, 38, 14);
		Vars2.add(ALMAS_b);
		
		JLabel HP_b = new JLabel("1000");
		HP_b.setBounds(0, 11, 28, 14);
		Vars2.add(HP_b);
		
		JPanel Campo = new JPanel();
		Campo.setBounds(237, 0, 652, 726);
		frame.getContentPane().add(Campo);
		Campo.setLayout(null);
		
		JPanel Propio = new JPanel();
		Propio.setBounds(10, 356, 647, 359);
		Campo.add(Propio);
		Propio.setBackground(Color.BLUE);
		Propio.setLayout(null);
		
		JPanel Hechizos_P = new JPanel();
		Hechizos_P.setBackground(Color.ORANGE);
		Hechizos_P.setBounds(10, 11, 624, 104);
		Propio.add(Hechizos_P);
		Hechizos_P.setLayout(null);
		
		final JPanel H1_a = new JPanel();
		H1_a.setBounds(0, 0, 117, 104);
		Hechizos_P.add(H1_a);
		H1_a.setLayout(null);
		
		final JLabel Sdx = new JLabel(" ");
		Sdx.setBackground(Color.WHITE);
		Sdx.setBounds(1, 505, 226, 207);
		frame.getContentPane().add(Sdx);
		
		final JRadioButton H1_a_S = new JRadioButton(" ");
		H1_a_S.setVisible(false);
		H1_a_S.setBounds(23, 88, 6, 6);
		H1_a.add(H1_a_S);
		H1_a_S.setVisible(false);
		
		
		ButtonGroup Selector=new ButtonGroup();
		Selector.add(H1_a_S);
		
		
		JLabel H1_a_I = new JLabel(" ");
		H1_a_I.setLabelFor(H1_a_S);
		H1_a_I.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				H1_a_S.setSelected(true);
			}
		});
		H1_a_I.addMouseMotionListener(new MouseMotionAdapter() {
			@Override
			public void mouseMoved(MouseEvent arg0) {
				Sdx.setIcon(new ImageIcon(Main.class.getResource("/Grafics/Diapositiva0.PNG")));
			}
		});
		
		H1_a_I.setIcon(new ImageIcon(Main.class.getResource("/Grafics/XDiapositiva0.PNG")));
		H1_a_I.setBounds(0, 0, 117, 104);
		H1_a.add(H1_a_I);
		
		
		
		
		
		JPanel H2_a = new JPanel();
		H2_a.setBounds(127, 0, 117, 104);
		Hechizos_P.add(H2_a);
		H2_a.setLayout(null);
		
		
		
		final JRadioButton H2_a_S = new JRadioButton("");
		H2_a_S.setBounds(48, 5, 21, 21);
		H2_a.add(H2_a_S);
		Selector.add(H2_a_S);
		
		JPanel H3_a = new JPanel();
		H3_a.setBounds(254, 0, 117, 104);
		Hechizos_P.add(H3_a);
		H3_a.setLayout(null);
		
		final JRadioButton H3_a_S = new JRadioButton("");
		H3_a_S.setBounds(6, 7, 109, 23);
		H3_a.add(H3_a_S);
		
		JPanel H4_a = new JPanel();
		H4_a.setBounds(380, 0, 117, 104);
		Hechizos_P.add(H4_a);
		H4_a.setLayout(null);
		
		final JRadioButton H4_a_S = new JRadioButton("");
		H4_a_S.setBounds(6, 7, 109, 23);
		H4_a.add(H4_a_S);
		
		JPanel H5_a = new JPanel();
		H5_a.setBounds(507, 0, 117, 104);
		Hechizos_P.add(H5_a);
		H5_a.setLayout(null);
		
		final JRadioButton H5_a_S = new JRadioButton("");
		H5_a_S.setBounds(6, 7, 109, 23);
		H5_a.add(H5_a_S);
		
		JPanel Artilugios_P = new JPanel();
		Artilugios_P.setLayout(null);
		Artilugios_P.setBackground(Color.ORANGE);
		Artilugios_P.setBounds(10, 126, 624, 104);
		Propio.add(Artilugios_P);
		
		JPanel A1_a = new JPanel();
		A1_a.setBounds(0, 0, 117, 104);
		Artilugios_P.add(A1_a);
		A1_a.setLayout(null);
		
		final JRadioButton A1_a_S = new JRadioButton("");
		A1_a_S.setBounds(0, 7, 109, 23);
		A1_a.add(A1_a_S);
		
		JPanel A2_a = new JPanel();
		A2_a.setBounds(126, 0, 117, 104);
		Artilugios_P.add(A2_a);
		A2_a.setLayout(null);
		
		final JRadioButton A2_a_S = new JRadioButton("");
		A2_a_S.setBounds(6, 7, 109, 23);
		A2_a.add(A2_a_S);
		
		JPanel A3_a = new JPanel();
		A3_a.setBounds(253, 0, 117, 107);
		Artilugios_P.add(A3_a);
		A3_a.setLayout(null);
		
		final JRadioButton A3_a_S = new JRadioButton("");
		A3_a_S.setBounds(6, 7, 109, 23);
		A3_a.add(A3_a_S);
		
		JPanel A4_a = new JPanel();
		A4_a.setBounds(380, 0, 117, 104);
		Artilugios_P.add(A4_a);
		A4_a.setLayout(null);
		
		final JRadioButton A4_a_S = new JRadioButton("");
		A4_a_S.setBounds(6, 7, 109, 23);
		A4_a.add(A4_a_S);
		
		JPanel A5_a = new JPanel();
		A5_a.setBounds(507, 0, 117, 104);
		Artilugios_P.add(A5_a);
		A5_a.setLayout(null);
		
		final JRadioButton A5_a_S = new JRadioButton("");
		A5_a_S.setBounds(6, 7, 109, 23);
		A5_a.add(A5_a_S);
		
		JPanel Armas_P = new JPanel();
		Armas_P.setLayout(null);
		Armas_P.setBackground(Color.ORANGE);
		Armas_P.setBounds(10, 241, 624, 104);
		Propio.add(Armas_P);
		
		JPanel X1_a = new JPanel();
		X1_a.setBounds(0, 0, 117, 104);
		Armas_P.add(X1_a);
		X1_a.setLayout(null);
		
		final JRadioButton X1_a_S = new JRadioButton("");
		X1_a_S.setBounds(48, 5, 21, 21);
		X1_a.add(X1_a_S);
		
		JPanel X2_a = new JPanel();
		X2_a.setBounds(126, 0, 117, 104);
		Armas_P.add(X2_a);
		X2_a.setLayout(null);
		
		final JRadioButton X2_a_S = new JRadioButton("");
		X2_a_S.setBounds(48, 5, 21, 21);
		X2_a.add(X2_a_S);
		
		JPanel X3_a = new JPanel();
		X3_a.setBounds(253, 0, 117, 104);
		Armas_P.add(X3_a);
		X3_a.setLayout(null);
		
		final JRadioButton X3_a_S = new JRadioButton("");
		X3_a_S.setBounds(48, 5, 21, 21);
		X3_a.add(X3_a_S);
		
		JPanel X4_a = new JPanel();
		X4_a.setBounds(380, 0, 117, 104);
		Armas_P.add(X4_a);
		X4_a.setLayout(null);
		
		final JRadioButton X4_a_S = new JRadioButton("");
		X4_a_S.setBounds(48, 5, 21, 21);
		X4_a.add(X4_a_S);
		
		JPanel X5_a = new JPanel();
		X5_a.setBounds(507, 0, 117, 104);
		Armas_P.add(X5_a);
		X5_a.setLayout(null);
		
		final JRadioButton X5_a_S = new JRadioButton("");
		X5_a_S.setBounds(48, 5, 21, 21);
		X5_a.add(X5_a_S);
		
		JPanel Enemigo = new JPanel();
		Enemigo.setLayout(null);
		Enemigo.setBackground(Color.BLUE);
		Enemigo.setBounds(10, 0, 647, 359);
		Campo.add(Enemigo);
		
		JPanel Hechizos_E = new JPanel();
		Hechizos_E.setLayout(null);
		Hechizos_E.setBackground(Color.ORANGE);
		Hechizos_E.setBounds(10, 11, 624, 104);
		Enemigo.add(Hechizos_E);
		
		JPanel H1_b = new JPanel();
		H1_b.setLayout(null);
		H1_b.setBounds(0, 0, 117, 104);
		Hechizos_E.add(H1_b);
		
		JLabel H1_b_I = new JLabel(" ");
		H1_b_I.setBounds(0, 0, 117, 104);
		H1_b.add(H1_b_I);
		
		JRadioButton H1_b_S = new JRadioButton("");
		H1_b_S.setBounds(0, 0, 109, 23);
		H1_b.add(H1_b_S);
		
		JPanel H2_b = new JPanel();
		H2_b.setBounds(127, 0, 117, 104);
		Hechizos_E.add(H2_b);
		H2_b.setLayout(null);
		
		JRadioButton H2_b_S = new JRadioButton("");
		H2_b_S.setBounds(48, 5, 21, 21);
		H2_b.add(H2_b_S);
		
		JPanel H3_b = new JPanel();
		H3_b.setBounds(254, 0, 117, 104);
		Hechizos_E.add(H3_b);
		H3_b.setLayout(null);
		
		JRadioButton H3_b_S = new JRadioButton("");
		H3_b_S.setBounds(48, 5, 21, 21);
		H3_b.add(H3_b_S);
		
		JPanel H4_b = new JPanel();
		H4_b.setBounds(380, 0, 117, 104);
		Hechizos_E.add(H4_b);
		H4_b.setLayout(null);
		
		JRadioButton H4_b_S = new JRadioButton("");
		H4_b_S.setBounds(48, 5, 21, 21);
		H4_b.add(H4_b_S);
		
		JPanel H5_b = new JPanel();
		H5_b.setBounds(507, 0, 117, 104);
		Hechizos_E.add(H5_b);
		H5_b.setLayout(null);
		
		JRadioButton H5_b_S = new JRadioButton("");
		H5_b_S.setBounds(48, 5, 21, 21);
		H5_b.add(H5_b_S);
		
		JPanel Artilugios_E = new JPanel();
		Artilugios_E.setLayout(null);
		Artilugios_E.setBackground(Color.ORANGE);
		Artilugios_E.setBounds(10, 126, 624, 104);
		Enemigo.add(Artilugios_E);
		
		JPanel A1_b = new JPanel();
		A1_b.setBounds(0, 0, 117, 104);
		Artilugios_E.add(A1_b);
		A1_b.setLayout(null);
		
		JRadioButton A1_b_S = new JRadioButton("");
		A1_b_S.setBounds(6, 7, 109, 23);
		A1_b.add(A1_b_S);
		
		JPanel A2_b = new JPanel();
		A2_b.setBounds(126, 0, 117, 104);
		Artilugios_E.add(A2_b);
		A2_b.setLayout(null);
		
		JRadioButton A2_b_S = new JRadioButton("");
		A2_b_S.setBounds(6, 7, 109, 23);
		A2_b.add(A2_b_S);
		
		JPanel A3_b = new JPanel();
		A3_b.setBounds(253, 0, 117, 107);
		Artilugios_E.add(A3_b);
		A3_b.setLayout(null);
		
		JRadioButton A3_b_S = new JRadioButton("");
		A3_b_S.setBounds(48, 5, 21, 21);
		A3_b.add(A3_b_S);
		
		JPanel A4_b = new JPanel();
		A4_b.setBounds(380, 0, 117, 104);
		Artilugios_E.add(A4_b);
		A4_b.setLayout(null);
		
		JRadioButton A4_b_S = new JRadioButton("");
		A4_b_S.setBounds(48, 5, 21, 21);
		A4_b.add(A4_b_S);
		
		JPanel A5_b = new JPanel();
		A5_b.setBounds(507, 0, 117, 104);
		Artilugios_E.add(A5_b);
		A5_b.setLayout(null);
		
		JRadioButton A5_b_S = new JRadioButton("");
		A5_b_S.setBounds(48, 5, 21, 21);
		A5_b.add(A5_b_S);
		
		JPanel Armas_E = new JPanel();
		Armas_E.setLayout(null);
		Armas_E.setBackground(Color.ORANGE);
		Armas_E.setBounds(10, 241, 624, 104);
		Enemigo.add(Armas_E);
		
		JPanel X1_b = new JPanel();
		X1_b.setBounds(0, 0, 117, 104);
		Armas_E.add(X1_b);
		X1_b.setLayout(null);
		
		JRadioButton X1_b_S = new JRadioButton("");
		X1_b_S.setBounds(48, 5, 21, 21);
		X1_b.add(X1_b_S);
		
		JPanel X2_b = new JPanel();
		X2_b.setBounds(126, 0, 117, 104);
		Armas_E.add(X2_b);
		X2_b.setLayout(null);
		
		JRadioButton X2_b_S = new JRadioButton("");
		X2_b_S.setBounds(48, 5, 21, 21);
		X2_b.add(X2_b_S);
		
		JPanel X3_b = new JPanel();
		X3_b.setBounds(253, 0, 117, 104);
		Armas_E.add(X3_b);
		X3_b.setLayout(null);
		
		JRadioButton X3_b_S = new JRadioButton("");
		X3_b_S.setBounds(48, 5, 21, 21);
		X3_b.add(X3_b_S);
		
		JPanel X4_b = new JPanel();
		X4_b.setBounds(380, 0, 117, 104);
		Armas_E.add(X4_b);
		X4_b.setLayout(null);
		
		JRadioButton X4_b_S = new JRadioButton("");
		X4_b_S.setBounds(48, 5, 21, 21);
		X4_b.add(X4_b_S);
		
		JPanel X5_b = new JPanel();
		X5_b.setBounds(507, 0, 117, 104);
		Armas_E.add(X5_b);
		X5_b.setLayout(null);
		
		JRadioButton X5_b_S = new JRadioButton("");
		X5_b_S.setBounds(48, 5, 21, 21);
		X5_b.add(X5_b_S);
		
		JPanel Mano = new JPanel();
		
		Mano.setBackground(Color.ORANGE);
		Mano.setBounds(886, 122, 263, 590);
		frame.getContentPane().add(Mano);
		Mano.setLayout(null);
		
		JPanel M1 = new JPanel();
		M1.setBounds(10, 11, 117, 104);
		Mano.add(M1);
		M1.setLayout(null);
		
		final JRadioButton M1_S = new JRadioButton("");
		M1_S.setBounds(48, 5, 21, 21);
		M1.add(M1_S);
		
		JPanel M2 = new JPanel();
		M2.setBounds(137, 11, 117, 104);
		Mano.add(M2);
		M2.setLayout(null);
		
		final JRadioButton M2_S = new JRadioButton("");
		M2_S.setBounds(48, 5, 21, 21);
		M2.add(M2_S);
		
		JPanel M3 = new JPanel();
		M3.setBounds(10, 126, 117, 104);
		Mano.add(M3);
		M3.setLayout(null);
		
		final JRadioButton M3_S = new JRadioButton("");
		M3_S.setBounds(48, 5, 21, 21);
		M3.add(M3_S);
		
		JPanel M4 = new JPanel();
		M4.setBounds(137, 126, 117, 104);
		Mano.add(M4);
		M4.setLayout(null);
		
		final JRadioButton M4_S = new JRadioButton("");
		M4_S.setBounds(48, 5, 21, 21);
		M4.add(M4_S);
		
		JPanel M5 = new JPanel();
		M5.setBounds(10, 243, 117, 104);
		Mano.add(M5);
		M5.setLayout(null);
		
		final JRadioButton M5_S = new JRadioButton("");
		M5_S.setBounds(48, 5, 21, 21);
		M5.add(M5_S);
		
		JPanel M6 = new JPanel();
		M6.setBounds(137, 243, 117, 104);
		Mano.add(M6);
		M6.setLayout(null);
		
		final JRadioButton M6_S = new JRadioButton("");
		M6_S.setBounds(48, 5, 21, 21);
		M6.add(M6_S);
		
		JPanel M7 = new JPanel();
		M7.setBounds(10, 358, 117, 104);
		Mano.add(M7);
		M7.setLayout(null);
		
		final JRadioButton M7_S = new JRadioButton("");
		M7_S.setBounds(48, 5, 21, 21);
		M7.add(M7_S);
		
		JPanel M8 = new JPanel();
		M8.setBounds(137, 358, 117, 104);
		Mano.add(M8);
		M8.setLayout(null);
		
		final JRadioButton M8_S = new JRadioButton("");
		M8_S.setBounds(48, 5, 21, 21);
		M8.add(M8_S);
		
		JPanel M9 = new JPanel();
		M9.setBounds(10, 473, 117, 104);
		Mano.add(M9);
		M9.setLayout(null);
		
		final JRadioButton M9_S = new JRadioButton("");
		M9_S.setBounds(48, 5, 21, 21);
		M9.add(M9_S);
		
		JPanel M10 = new JPanel();
		M10.setBounds(137, 473, 117, 104);
		Mano.add(M10);
		M10.setLayout(null);
		
		final JRadioButton M10_S = new JRadioButton("");
		M10_S.setBounds(48, 5, 21, 21);
		M10.add(M10_S);
		

		Selector.add(H2_a_S);
		
		JLabel H2_a_I = new JLabel(" ");
		H2_a_I.addMouseMotionListener(new MouseMotionAdapter() {
			@Override
			public void mouseMoved(MouseEvent arg0) {
				Sdx.setIcon(new ImageIcon(Main.class.getResource("/Grafics/Diapositiva1.PNG")));
			}
		});
		H2_a_I.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				H2_a_S.setSelected(true);
			}
		});
		H2_a_I.setIcon(new ImageIcon(Main.class.getResource("/Grafics/XDiapositiva1.PNG")));
		H2_a_I.setBounds(0, 0, 117, 104);
		H2_a.add(H2_a_I);
		Selector.add(H3_a_S);
		
		JLabel H3_a_I = new JLabel(" ");
		H3_a_I.setBounds(-2, 0, 117, 104);
		H3_a.add(H3_a_I);
		Selector.add(H4_a_S);
		
		JLabel H4_a_I = new JLabel(" ");
		H4_a_I.setBounds(-2, 0, 117, 104);
		H4_a.add(H4_a_I);
		Selector.add(H5_a_S);
		
		JLabel H5_a_I = new JLabel(" ");
		H5_a_I.setBounds(-2, 0, 117, 104);
		H5_a.add(H5_a_I);
		Selector.add(A1_a_S);
		
		JLabel A1_a_I = new JLabel(" ");
		A1_a_I.setBounds(0, 0, 117, 104);
		A1_a.add(A1_a_I);
		Selector.add(A2_a_S);
		
		JLabel A2_a_I = new JLabel(" ");
		A2_a_I.setBounds(-2, 0, 117, 104);
		A2_a.add(A2_a_I);
		Selector.add(A3_a_S);
		
		JLabel A3_a_I = new JLabel(" ");
		A3_a_I.setBounds(0, 0, 117, 104);
		A3_a.add(A3_a_I);
		Selector.add(A4_a_S);
		
		JLabel A4_a_I = new JLabel(" ");
		A4_a_I.setBounds(-2, 0, 117, 104);
		A4_a.add(A4_a_I);
		Selector.add(A5_a_S);
		
		JLabel A5_a_I = new JLabel(" ");
		A5_a_I.setBounds(-2, 0, 117, 104);
		A5_a.add(A5_a_I);
		Selector.add(X1_a_S);
		
		JLabel X1_a_I = new JLabel(" ");
		X1_a_I.setBounds(0, 0, 117, 104);
		X1_a.add(X1_a_I);
		Selector.add(X2_a_S);
		
		JLabel X2_a_I = new JLabel(" ");
		X2_a_I.setBounds(0, 0, 117, 104);
		X2_a.add(X2_a_I);
		Selector.add(X3_a_S);
		
		JLabel X3_a_I = new JLabel(" ");
		X3_a_I.setBounds(0, 0, 117, 104);
		X3_a.add(X3_a_I);
		Selector.add(X4_a_S);
		
		JLabel X4_a_I = new JLabel(" ");
		X4_a_I.setBounds(0, 0, 117, 104);
		X4_a.add(X4_a_I);
		Selector.add(X5_a_S);
		
		JLabel X5_a_I = new JLabel(" ");
		X5_a_I.setBounds(0, 0, 117, 104);
		X5_a.add(X5_a_I);
		
		Selector.add(H1_b_S);
		Selector.add(H2_b_S);
		
		JLabel H2_b_I = new JLabel(" ");
		H2_b_I.setBounds(0, 0, 117, 104);
		H2_b.add(H2_b_I);
		Selector.add(H3_b_S);
		
		JLabel H3_b_I = new JLabel(" ");
		H3_b_I.setBounds(0, 0, 117, 104);
		H3_b.add(H3_b_I);
		Selector.add(H4_b_S);
		
		JLabel H4_b_I = new JLabel(" ");
		H4_b_I.setBounds(0, 0, 117, 104);
		H4_b.add(H4_b_I);
		Selector.add(H5_b_S);
		
		JLabel H5_b_I = new JLabel(" ");
		H5_b_I.setBounds(0, 0, 117, 104);
		H5_b.add(H5_b_I);
		Selector.add(A1_b_S);
		
		JLabel A1_b_I = new JLabel(" ");
		A1_b_I.setBounds(0, 0, 117, 104);
		A1_b.add(A1_b_I);
		Selector.add(A2_b_S);
		
		JLabel A2_b_I = new JLabel(" ");
		A2_b_I.setBounds(0, 0, 117, 104);
		A2_b.add(A2_b_I);
		Selector.add(A3_b_S);
		
		JLabel A3_b_I = new JLabel(" ");
		A3_b_I.setBounds(0, 0, 117, 104);
		A3_b.add(A3_b_I);
		Selector.add(A4_b_S);
		
		JLabel A4_b_I = new JLabel(" ");
		A4_b_I.setBounds(0, 0, 117, 104);
		A4_b.add(A4_b_I);
		Selector.add(A5_b_S);
		
		JLabel A5_b_I = new JLabel(" ");
		A5_b_I.setBounds(0, 0, 117, 104);
		A5_b.add(A5_b_I);
		Selector.add(X1_b_S);
		
		JLabel X1_b_I = new JLabel(" ");
		X1_b_I.setBounds(0, 0, 117, 104);
		X1_b.add(X1_b_I);
		Selector.add(X2_b_S);
		
		JLabel X2_b_I = new JLabel(" ");
		X2_b_I.setBounds(0, 0, 117, 104);
		X2_b.add(X2_b_I);
		Selector.add(X3_b_S);
		
		JLabel X3_b_I = new JLabel(" ");
		X3_b_I.setBounds(0, 0, 117, 104);
		X3_b.add(X3_b_I);
		Selector.add(X4_b_S);
		
		JLabel X4_b_I = new JLabel(" ");
		X4_b_I.setBounds(0, 0, 117, 104);
		X4_b.add(X4_b_I);
		Selector.add(X5_b_S);
		
		JLabel X5_b_I = new JLabel(" ");
		X5_b_I.setBounds(0, 0, 117, 104);
		X5_b.add(X5_b_I);
		
		Selector.add(M1_S);
		
		JLabel M1_I = new JLabel(" ");
		M1_I.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				M1_S.setSelected(true);
			}
		});
		M1_I.setBounds(0, 0, 117, 104);
		M1.add(M1_I);
		Selector.add(M2_S);
		
		JLabel M2_I = new JLabel(" ");
		M2_I.setBounds(0, 0, 117, 104);
		M2.add(M2_I);
		Selector.add(M3_S);
		
		JLabel M3_I = new JLabel(" ");
		M3_I.setBounds(0, 0, 117, 104);
		M3.add(M3_I);
		Selector.add(M4_S);
		
		JLabel M4_I = new JLabel(" ");
		M4_I.setBounds(0, 0, 117, 104);
		M4.add(M4_I);
		Selector.add(M5_S);
		
		JLabel M5_I = new JLabel(" ");
		M5_I.setBounds(0, 0, 117, 104);
		M5.add(M5_I);
		Selector.add(M6_S);
		
		JLabel M6_I = new JLabel(" ");
		M6_I.setBounds(0, 0, 117, 104);
		M6.add(M6_I);
		Selector.add(M7_S);
		
		JLabel M7_I = new JLabel(" ");
		M7_I.setBounds(0, 0, 117, 104);
		M7.add(M7_I);
		Selector.add(M8_S);
		
		JLabel M8_I = new JLabel(" ");
		M8_I.setBounds(0, 0, 117, 104);
		M8.add(M8_I);
		Selector.add(M9_S);
		
		JLabel M9_I = new JLabel(" ");
		M9_I.setBounds(0, 0, 117, 104);
		M9.add(M9_I);
		Selector.add(M10_S);
		
		JLabel M10_I = new JLabel(" ");
		M10_I.setBounds(0, 0, 117, 104);
		M10.add(M10_I);

		
		frame.addMouseMotionListener(new MouseMotionAdapter() {
			@Override
			public void mouseMoved(MouseEvent arg0) {
				if(M1_S.isSelected()||M2_S.isSelected()||M3_S.isSelected()||M4_S.isSelected()||M5_S.isSelected()||M6_S.isSelected()||M7_S.isSelected()||M8_S.isSelected()||M9_S.isSelected()||M10_S.isSelected())
				{
					Colocar.setVisible(true);
				}
				else
				{
					Colocar.setVisible(false);
				}
				if(H1_a_S.isSelected()||H2_a_S.isSelected()||H3_a_S.isSelected()||H4_a_S.isSelected()||H5_a_S.isSelected()||A1_a_S.isSelected()||A2_a_S.isSelected()||A3_a_S.isSelected()||A4_a_S.isSelected()||A5_a_S.isSelected()||X1_a_S.isSelected()||X2_a_S.isSelected()||X3_a_S.isSelected()||X4_a_S.isSelected()||X5_a_S.isSelected())
				{
					Retirar.setVisible(true);
				}
				else
				{
					Retirar.setVisible(false);
				}
				
			}
		});
		
		H1_a_S.setVisible(false);
		H2_a_S.setVisible(false);
		H3_a_S.setVisible(false);
		H4_a_S.setVisible(false);
		H5_a_S.setVisible(false);
		A1_a_S.setVisible(false);
		A2_a_S.setVisible(false);
		A3_a_S.setVisible(false);
		A4_a_S.setVisible(false);
		A5_a_S.setVisible(false);
		X1_a_S.setVisible(false);
		X2_a_S.setVisible(false);
		X3_a_S.setVisible(false);
		X4_a_S.setVisible(false);
		X5_a_S.setVisible(false);
		
		H1_b_S.setVisible(false);
		H2_b_S.setVisible(false);
		H3_b_S.setVisible(false);
		H4_b_S.setVisible(false);
		H5_b_S.setVisible(false);
		A1_b_S.setVisible(false);
		A2_b_S.setVisible(false);
		A3_b_S.setVisible(false);
		A4_b_S.setVisible(false);
		A5_b_S.setVisible(false);
		X1_b_S.setVisible(false);
		X2_b_S.setVisible(false);
		X3_b_S.setVisible(false);
		X4_b_S.setVisible(false);
		X5_b_S.setVisible(false);
		
		M1_S.setVisible(false);
		M2_S.setVisible(false);
		M3_S.setVisible(false);
		M4_S.setVisible(false);
		M5_S.setVisible(false);
		M6_S.setVisible(false);
		M7_S.setVisible(false);
		M8_S.setVisible(false);
		M9_S.setVisible(false);
		M10_S.setVisible(false);
		
		
		JPanel Mensajes = new JPanel();
		Mensajes.setBackground(Color.LIGHT_GRAY);
		Mensajes.setBounds(894, 11, 244, 100);
		frame.getContentPane().add(Mensajes);
		Mensajes.setLayout(null);
		
		
	}
}


class temp
{
	private static int z=0;
	public static int zi()
	{
		z+=1;
		return z;
	}
	
	}